package com.example.business_oa.service;

import com.example.comment_oa.dubbo.JobServiceDubbo;
import com.example.comment_oa.pojos.Jobrequirements;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

@Service
public class HyJobService {
    @DubboReference(version = "1.0.0")
    JobServiceDubbo jobServiceDubbo;

    //新增用工需求申请
    @GlobalTransactional(timeoutMills = 600000)
    public int addjob(Jobrequirements job) {
        int addjob = jobServiceDubbo.addjob(job);
        return addjob;
    }
    //流程审批成功
    @GlobalTransactional(timeoutMills = 600000)
    public int jobStatus(String jobPostname, String jobBianhao) {
        int i = jobServiceDubbo.jobStatus(jobPostname, jobBianhao);
        return i;
    }

    //流程审批失败
    @GlobalTransactional(timeoutMills = 600000)
    public int jobStatuss(String jobPostname, String jobBianhao) {
        int i = jobServiceDubbo.jobStatuss(jobPostname, jobBianhao);
        return i;
    }
}
